package com.example.main.fragment.home.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.main.R
import com.example.main.fragment.home.bean.HomeNavItem

class HomeNavItemAdapter:BaseQuickAdapter<HomeNavItem,BaseViewHolder>(R.layout.home_nav_item_layout) {
    override fun convert(helper: BaseViewHolder, item: HomeNavItem) {
        val home_nav_item_icon = helper.getView<ImageView>(R.id.home_nav_item_icon)
        Glide.with(home_nav_item_icon).load(item.img).into(home_nav_item_icon)
        helper.setText(R.id.home_nav_item_title,item.title)
    }
}